<div class="bs-example">

			<div style="padding-bottom:15px;">
				<?php 
					echo $quyetion['Question']['name'];
				?>
				<div style="width:90%;margin:0px auto;padding-top:20px;">
                                    <table  class="table table-striped table-bordered">
					<tr>
						<th>stt</th>
						<th>Câu trả lời</th>
						<th>Đán án</th>
						<th>Actions</th>
					</tr>
					<?php $i=1; foreach($ans as $an ){ ?>
					<tr>
						<td><?php echo $i;?></td>
						<td width="60%"><?php echo $an['Answer']['name']?></td>
						<td><?php if($an['Answer']['ruler']==0){
								echo "<b style='color:red;'>sai</b>";
							}else{
								echo "<b style='color:#5CB85C'>đúng</b>";
							}?>
						</td>
						<td>
						
						<?php echo $this->Html->link(__(''), array('action' => 'edit', $an['Answer']['id']),array('title'=>'Sửa câu hỏi','class'=>'fa fa-pencil-square-o','style'=>'font-size:20px;padding: 0 2px;')); ?>
                                                <?php echo $this->Form->postLink(__(''), 
                                                                array('action' => 'delete',$an['Answer']['id']),
                                                                array('title'=>'Xóa đáp án','class'=>'fa  fa-trash-o','style'=>'color:#000;font-size:20px;padding: 0 2px;'), 
                                                                __('Bạn muốn xóa đáp án? ', 
                                                               $an['Answer']['id'])); ?>	
						</td>
						
					</tr>
					<?php $i++;} ?>
				</table>
				</div>
				
			</div>
			
<?php echo $this->Form->create('Answer',array('class'=>'form-horizontal'));?>
	<fieldset>			
			
        <legend><?php echo __('Thêm mới đáp án'); ?></legend>
	
         <div class="form-group">
             <label for="inputEmail3" class="col-sm-2 control-label"> Đáp án</label>
             <div class="col-sm-6">
                 <?php
                        echo $this->Form->input('name', array('div'=>'clearfix',
                            'before'=>'<label>'.__('').'</label><div class="input">',
                            'after'=>$this->Form->error('name', array(), array('wrap' => 'p', 'class' => 'alert alert-danger','style'=>'width:93%')).'</div>',
                            'error' => array('attributes' => array('style' => 'display:none')),
                            'label'=>false, 
                            'class'=>'xlarge',
                            'type' => 'textarea',
                            'cols'=>'100',
                            'rows'=>'3'

                                            ));

                    ?>
                 
             </div>
        </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">Kết quả</label>
            <div class="col-sm-6">
              
                <div class="radio">
                    <label>
                      <input type="radio" name="data[Answer][ruler]" id="optionsRadios1" value="0" checked>
                     Sai
                    </label>
              </div>
                <div class="radio">
                    <label>
                      <input type="radio" name="data[Answer][ruler]" id="optionsRadios2" value="1" >
                      Đúng
                    </label>
              </div>
            </div> 
        </div>
          <div class="form-group">
                <label for="inputEmail3" class="col-sm-2 control-label"> </label>
                <div class="col-sm-4">
                <button type="submit" class="btn btn-primary"> Thêm mới</button>
                <button type="reset" class="btn btn-danger"> Hủy</button>                       

                </div>
	  </div>    
	
	<input type="hidden" name="data[Answer][id_quyestion]" value="<?php echo $quyetion['Question']['id']?>"></input>
       
	</fieldset>
<?php echo $this->Form->end();?>
</div>
